package com.qing.mvc.entity;

import jakarta.validation.constraints.Max;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;

import java.util.Date;

public class User {


	private String name;

	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
	private Date birthday;

	@NumberFormat(style = NumberFormat.Style.PERCENT)
	private double discount;

	@NumberFormat(style = NumberFormat.Style.NUMBER,pattern ="#,###")
	private int total;


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Override
	public String toString() {
		return "User{" +
				"name='" + name + '\'' +
				", birthday=" + birthday +
				'}';
	}
}
